from django.test import TestCase
import random
from ronglian_sms_sdk import SmsSDK
from celery import Celery


# accId = '8aaf070881ad8ad401821a3746221b5e'
# accToken = 'c3331c51b9f4988a2c49e43752cb0737'
# appId = '8aaf070881ad8ad401821a3747091b65'
#
#
# def send_message():
#     sdk = SmsSDK(accId, accToken, appId)
#     tid = '1'  # 容联云分配的一个测试短信验证码模版
#     mobile = '15801288490'  # 接收短信的手机号
#     data = random.randint(000000, 999999)
#     datas = (data,)
#     resp = sdk.sendMessage(tid, mobile, datas)
#     print(resp)


# send_message()


celery = Celery("my_celery", broker="redis://:@127.0.0.1:6379/9")


@celery.task
def send():
    print('测试异步任务')


















